package conf2.ui;

import java.awt.Point;

/**
 *
 * @author Administrator
 */
public class Positions
{

    public static Point[] createMySpecialCardWidgetLocations(final int panelWidth, final int panelHeight)
    {
        Point[] cardPos = new Point[4];

        final int VSPACE = 3;
        final int HSPACE = 5;

        //
        //       |
        //  3  2 |
        //  1  0 |
        // ------+

        cardPos[0] = new Point(
                panelWidth - HSPACE - SpecialCardWidget.CARD_WIDTH,
                panelHeight - VSPACE - SpecialCardWidget.CARD_HEIGHT);

        cardPos[1] = new Point(
                cardPos[0].x - HSPACE - SpecialCardWidget.CARD_WIDTH,
                cardPos[0].y);

        cardPos[2] = new Point(
                cardPos[0].x,
                cardPos[0].y - VSPACE - SpecialCardWidget.CARD_HEIGHT);

        cardPos[3] = new Point(
                cardPos[1].x,
                cardPos[2].y);
        return cardPos;
    }

    public static Point[] createOpponentSpecialCardWidgetLocations(final int panelWidth)
    {
        Point[] oppPos = new Point[4];

        final int VSPACE = 3;
        final int HSPACE = 5;

        // --------+
        //    1  0 |
        //    3  2 |
        //         |

        oppPos[0] = new Point(
                panelWidth - HSPACE - SpecialCardMiniature.CARD_WIDTH,
                VSPACE);

        oppPos[1] = new Point(
                oppPos[0].x - HSPACE - SpecialCardMiniature.CARD_WIDTH,
                oppPos[0].y);

        oppPos[2] = new Point(
                oppPos[0].x,
                oppPos[0].y + VSPACE + SpecialCardMiniature.CARD_HEIGHT);

        oppPos[3] = new Point(
                oppPos[1].x,
                oppPos[2].y);
        return oppPos;
    }
}
